scroungr
Old Hand
Registered: 10/17/03
Posts: 2409
Loc: Richmond, VA
Mod Name / Version: Eventspal.php v1.0 <br /> <br />Description: Ok I can now <br /> <br />Get Yearly public dates and filter them correctly even recurring yearly <br /> <br />Get Monthly public dates and filter them correctly even recurring Monthly <br /> <br />Get Birthdates and filter them correctly <br /> <br />Lastly I can now get dates from the post table and calendar according to usergroup. <br /> <br />Added a check so that if you have no events, it will spit out so. <br /> <br />Working Under: UBB.Threads 6.4 and 6.4.1 <br /> <br />Mod Status: Beta <br /> <br />Any pre-requisites: IIP because you will not authenicated without it unless you add a function for that. <br /> <br />Author(s): scroungr <br /> <br />Date: 01/13/04 <br /> <br />Credits: David Lozier for original IIP, Joshpet for updating IIP <br /> <br />Files Altered: eventspal.php <br /> <br />New Files: eventspal.php <br /> <br />Database Altered: No <br /> <br />Info/Instructions: Just change extension from .txt to .php upload this into the pals directory and overwrite existing eventspal.php and set the variables <br /> <br />// Setable variables <br /> <br />// should admins/mods see all dates <br />// 0 - yes <br />// 1 - no <br /> $adminmodshow = '1'; <br /> <br />// should all events for a given date show under one date <br />// 0 - yes <br />// 1 - no <br />$showdatesunderone = '0'; <br /> <br />// show Group Dates on events pal <br />// 0 - Show Seperately Below the Events under a Group Heading <br />// 1 - Show Mixed in with the Events <br />// 2 or other means won't show at all <br /> $groupshow = '0'; <br />// show all Group Dates or just the users in events pal <br />// 0 - Show all dates for okay board's for all <br />// 1 - Show all dates for okay board's just for user <br /> $showallgroupdates = '1'; <br /> <br />// show Birth Dates on events pal <br />// 0 - Show Seperately Below the Events under a Birthday Heading <br />// 1 - Show Mixed in with the Events <br />// 2 or other means won't show at all <br /> $birthdayshow = '2'; <br /> <br />Disclaimer: Please backup every file that you intend to modify. <br />If the modification modifies the database, it's a good idea to backup your database before doing so. <br /> <br />Note: If you modify your UBB.Threads code, you may be giving up your right for "official" support from Infopop.If you need official support, you'll need to restore unmodified files.
_________________________
Couchtomatoe - www.couch-tomatoe.cc My abilities are for hire for installs, upgrades, custom themes and custom modifications.
scroungr
Old Hand
Registered: 10/17/03
Posts: 2409
Loc: Richmond, VA
if someone with a buset sight with alot of users and alot of events can try this I would appreciate it. it works fine on my site..
_________________________
Couchtomatoe - www.couch-tomatoe.cc My abilities are for hire for installs, upgrades, custom themes and custom modifications.
Registered: 03/01/01
Posts: 652
Loc: West Fargo, ND USA
Very cool scroungr, nice job. <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" /><br /><br />Will definitely be testing this out once I'm finished hacking away on my upgrade. <img src="http://www.ubbdev.com/forum/images/graemlins/wink.gif" alt="" />
I can view the events for a private forum when I am not logged in (although when I click the event it does not show any details) is this by design or is it a bug?
scroungr
Old Hand
Registered: 10/17/03
Posts: 2409
Loc: Richmond, VA
thats what I needed to know.. try and clear your cookies when your not logged in and see if you can see the same.
_________________________
Couchtomatoe - www.couch-tomatoe.cc My abilities are for hire for installs, upgrades, custom themes and custom modifications.
scroungr
Old Hand
Registered: 10/17/03
Posts: 2409
Loc: Richmond, VA
damn ok thanx...
_________________________
Couchtomatoe - www.couch-tomatoe.cc My abilities are for hire for installs, upgrades, custom themes and custom modifications.
scroungr
Old Hand
Registered: 10/17/03
Posts: 2409
Loc: Richmond, VA
think it has to do with the $users['U_Group'];
_________________________
Couchtomatoe - www.couch-tomatoe.cc My abilities are for hire for installs, upgrades, custom themes and custom modifications.
scroungr
Old Hand
Registered: 10/17/03
Posts: 2409
Loc: Richmond, VA
okay this is fixed now.. had a logi problem.. now it shows all public dates whether they reccur yearly or monthly or never to anyone.. only show private dates to people within the same group as the user whether they reccur yearly or monthly or never and it also shows dates that are entered whether in calendar or events and also shows birthdays..<br /><br />Someone with alot of events and alot of groups please try this..
_________________________
Couchtomatoe - www.couch-tomatoe.cc My abilities are for hire for installs, upgrades, custom themes and custom modifications.
scroungr
Old Hand
Registered: 10/17/03
Posts: 2409
Loc: Richmond, VA
would have been nice if I had put the correct one in there good thing I checked...
_________________________
Couchtomatoe - www.couch-tomatoe.cc My abilities are for hire for installs, upgrades, custom themes and custom modifications.
scroungr
Old Hand
Registered: 10/17/03
Posts: 2409
Loc: Richmond, VA
I am betting you are part of those groups somewhere or they of yours.... make sure you are not in users just in admin and make sure you and they share no common groups. if say you have and users1 and a users2 group and a third group lets say users3 and a user from users1 is put into users3 he will see all events for all users in users1 and users3 even if there is a user in user2 and user3. Also MODS and ADMIN will see ALL events because they see ALL groups.. create a user and just put him in users2 group and he will only see events for people in users2.
_________________________
Couchtomatoe - www.couch-tomatoe.cc My abilities are for hire for installs, upgrades, custom themes and custom modifications.
scroungr
Old Hand
Registered: 10/17/03
Posts: 2409
Loc: Richmond, VA
I can probably put another switch in there so that the admin could choose NOT to see everyone's events?
_________________________
Couchtomatoe - www.couch-tomatoe.cc My abilities are for hire for installs, upgrades, custom themes and custom modifications.
I am not sure I follow that hehe.<br />The problem I have with this is that I can see topics for groups that I am not a member of. This makes the event pal usecure for events that are private for say a particulkar group that holds group events. although I can click on the event and get a blank enough information is normally in the title to figureout what is happening.
scroungr
Old Hand
Registered: 10/17/03
Posts: 2409
Loc: Richmond, VA
but your the admin or are you using a user account when you can see that?
_________________________
Couchtomatoe - www.couch-tomatoe.cc My abilities are for hire for installs, upgrades, custom themes and custom modifications.
I am admin but I have a lot of boards that I dont monitor, They are private forums for other gaming guilds that use our forums as a place to hang there hat and I only go there if it is absolutely necessary which is almost never. I am not a member of thsoe groups.
scroungr
Old Hand
Registered: 10/17/03
Posts: 2409
Loc: Richmond, VA
yeah but your an admin hence you see it all. So I will have to add a switch that is basically.. if your an admin or a mod do you WANT to see it all <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" />
_________________________
Couchtomatoe - www.couch-tomatoe.cc My abilities are for hire for installs, upgrades, custom themes and custom modifications.
JoshPet
I type Like navaho
Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
OK - this is great.<br /><br />A couple of things.<br /><br />Indeed when you login as a regular user, you can see events for forums they don't have access to.<br /><br />I didn't totally wrap my head around all that you did, but I don't see a query to the w3t_Boards table in there, so somewhere along the line, you've got to query the read permissions of the w3t_Baords table and see if whatever forum that event belongs to is seen by this group.<br /><br />This is pretty complicated. <img src="http://www.ubbdev.com/forum/images/graemlins/tongue.gif" alt="" /> So I'm not sure exactly how to go about it, but if you study how it's done in the the calendar script, that should give a bit of an idea.<br /><br /><br />One other suggestion, and I'm not sure if it's easily possible. <img src="http://www.ubbdev.com/forum/images/graemlins/crazy.gif" alt="" /> But it would be great for the different event types to get 'grouped' under the date. So that the same date doesn't have to repeate if there are multiple things listed under a day.<br /><br />Wonderful work on this.<br /><br />As soon as this is set, we'll put out 5.4.5 with this inclluded. I'm finishing up some other IIP improvements. <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" /><br /><br />thanks again!
scroungr
Old Hand
Registered: 10/17/03
Posts: 2409
Loc: Richmond, VA
thanx Josh I will take a look at the code and see what I can do.. and a regular user can only access events of people in his group bur yeah if that user is in another group he sees those also so yeah maybe I will have to look at using that from the w3t_Boards table first prior to figuring out what the user can actually see... I will work on this more this week
_________________________
Couchtomatoe - www.couch-tomatoe.cc My abilities are for hire for installs, upgrades, custom themes and custom modifications.
JoshPet
I type Like navaho
Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Well actually in my testing, if it helps, I posted an event in a forum only visible to the moderators group - and it was visible when I was logged in as a regular user, but not if I wasn't logged in.